package io.xxx.xbutler.domain;

import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;
import java.time.LocalTime;

/**
 * 门店设置是延迟初始化的，只有当门店进行第一次查询之后才会写入
 */
@Data
@Accessors(chain = true)
public class StoreSettings {

    @TableId
    private Long id;

    private Long storeId;

    private String storeCode;

    private Boolean pushEnabled;

    private LocalTime startPushTime;

    private LocalTime endPushTime;

    private Integer maxPushQuantity;

    private LocalDateTime createdTime;

    private LocalDateTime updatedTime;

    public boolean isPushEnabled() {
        return pushEnabled != null && pushEnabled;
    }
}
